package com.hvtt.web.models;

import com.hvtt.web.utilities.Utilities;
import java.io.Serializable;
import java.sql.SQLException;

public class C_tuvanchovai implements Serializable{
	private long iD = 0;
	private long nganHangID = 0;
	private String loai = "";
	private double laiXuat = 0;
	private String dienGiai = "";
        private String nganHang = "";
        private String loaiVN="";
	private double pTThanhToanTruoc = 0;
	public C_tuvanchovai() {}
	public C_tuvanchovai (long iD,long nganHangID,String loai,double laiXuat,String dienGiai,double pTThanhToanTruoc){
		this.iD = iD;
		this.nganHangID = nganHangID;
		this.loai = loai;
		this.laiXuat = laiXuat;
		this.dienGiai = dienGiai;
		this.pTThanhToanTruoc = pTThanhToanTruoc;
	}
	public long getID(){return iD;}
	public void setID(long iD){ this.iD = iD;}
	public long getNganHangID(){return nganHangID;}
	public void setNganHangID(long nganHangID){ this.nganHangID = nganHangID;}
	public String getLoai(){return loai;}
	public void setLoai(String loai){ this.loai = loai;}
	public double getLaiXuat(){return laiXuat;}
	public void setLaiXuat(double laiXuat){ this.laiXuat = laiXuat;}
	public String getDienGiai(){return dienGiai;}
	public void setDienGiai(String dienGiai){ this.dienGiai = dienGiai;}
	public double getPTThanhToanTruoc(){return pTThanhToanTruoc;}
	public void setPTThanhToanTruoc(double pTThanhToanTruoc){ this.pTThanhToanTruoc = pTThanhToanTruoc;}
	public void resetAttribute() {
		iD = 0;
		nganHangID = 0;
		loai = "";
		laiXuat = 0;
		dienGiai = "";
		pTThanhToanTruoc = 0;
                loaiVN="";
	}

    /**
     * @return the nganHang
     */
    public String getNganHang() {
        return nganHang;
    }

    /**
     * @param nganHang the nganHang to set
     */
    public void setNganHang(String nganHang) {
        this.nganHang = nganHang;
    }

    /**
     * @return the LoaiVN
     */
    public String getLoaiVN() throws SQLException {
        return ("M".equals(this.loai.trim())?Utilities.getLanguages("Month"):Utilities.getLanguages("Year"));
    }

    /**
     * @param LoaiVN the LoaiVN to set
     */
    public void setLoaiVN(String loaiVN) {
        this.loaiVN = loaiVN;
    }
}